<template>
    <div>

        <div class='A'>
            <div><h3>个人主页</h3></div>
            <div>
                <div>姓名:{{user.name}}</div>
            </div>
            <div>
                <div>年龄:{{user.age}}</div>
            </div>
            <div>
                <div>密码:{{user.password}}</div>
            </div>
            <div>
                <button @click="logout">推出登录</button>
            </div>

        </div>
    </div>
</template>

<script lang="ts">
import { Vue } from 'vue-class-component';
import { UserApi } from "@/api/user";
import router from '@/router';

export default class UerHome extends Vue {
    user={
        name:"敬叫换",
        age:22,
        marrage:'yes',
        password:123
    }
    // 退出登录
    logout() {
        router.push({
            name:"login"
        })
    }

}
</script>

<style lang="less" scoped>
.A{
    div{
        text-align: center;
    }
    margin:auto;
    margin-top: 100px;
    border:2px solid #ccc;
    border-radius:10px;
    height:220px;
    width:440px;
    background-color:#fff;
}
</style>